﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using System.Timers;

namespace Thunder
{
    /// <summary>
    ///子弹 
    /// </summary>
    class Bullet
    {

        public DateTime Today { get; set; }
        public Rectangle Rectangle { get; set; }
        private bool moveable { get; set; }
        private int SpeedY;

        public Bullet(Rectangle rectangle)
        {
            Rectangle = rectangle;
            SpeedY = -25;
            Today = System.DateTime.Now.AddSeconds(10);
            
            moveable = true;
        }

        public Bullet(Rectangle rectangle, bool _moveable)
        {
            Today = System.DateTime.Now.AddSeconds(10);
            Rectangle = rectangle;
            moveable = _moveable;

        }

        public void Draw(Graphics g)
        {
            
            g.DrawImage(Properties.Resources.Bullet, Rectangle);
        }
        public void Move()
        {
            if (moveable)
                this.Rectangle = new Rectangle(Rectangle.X, Rectangle.Y + SpeedY, Rectangle.Width, Rectangle.Height);
        }
        
    }
}
